package com.liruo.treasureattic.service.url.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.liruo.treasureattic.common.model.entity.UrlFolder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author LYM
* @description 针对表【url_folder】的数据库操作Mapper
* @createDate 2022-10-31 20:29:39
* @Entity com.liruo.treasureattic.common.model.entity.UrlFolder
*/
public interface UrlFolderMapper extends BaseMapper<UrlFolder> {
    /**
     *
     * @param intervalTime  回收日期时限--- now - utime >= intervalTime 的就回收--彻底删除
     * @return
     */
    boolean realDeleteUrlFolder(@Param("intervalTime")int intervalTime);

    List<Long> getBeDeletedFolderId(@Param("intervalTime")int intervalTime);

    boolean realDeleteSubFolderByFid(@Param("fids") List<Long> beDeleteFolderId);


    /**
     *
     * @return  root folder和直接子folder
     */
    List<UrlFolder> getOnceWithRoot(@Param("rootId") Long rootId, @Param("userId") long userId, @Param("open") Boolean open);
}




